/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package games.freecell.core;

import commomgame.RulesOfMovement;
import commomgame.SubRegion;

/**
 *
 * @author ian
 */
public class RulesOfCells extends RulesOfMovement {

    @Override
    public boolean verifyMovement(int value, String nipe, SubRegion regionOrigin, SubRegion regionTarget) {

        if (this.isEmptyStack(regionTarget)) {
            //regionTarget.addCardsAfterMovement(regionOrigin.selectCard(value, nipe), regionOrigin);
            //regionOrigin.removeCard(regionOrigin.selectCard(value, nipe));
            if (!regionOrigin.setOfCard.isEmpty()) {
                regionOrigin.setOfCard.get(0).setIsShowed(true);
            }
            return true;
        } else {
            return false;
        }
        
    }
}
